.class Lcom/waiqin365/lightapp/sales/n;
.super Landroid/os/Handler;


# instance fields
.field final synthetic a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;


# direct methods
.method constructor <init>(Lcom/waiqin365/lightapp/sales/SalesInfoActivity;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    invoke-direct {p0}, Landroid/os/Handler;-><init>()V

    return-void
.end method


# virtual methods
.method public handleMessage(Landroid/os/Message;)V
    .locals 11

    const/4 v10, 0x0

    const/4 v9, 0x1

    const/4 v8, 0x0

    iget v0, p1, Landroid/os/Message;->what:I

    packed-switch v0, :pswitch_data_0

    :goto_0
    return-void

    :pswitch_0
    iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v0, Lcom/waiqin365/lightapp/sales/b/a/j;

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/sales/b/a/j;->b()Z

    move-result v1

    if-eqz v1, :cond_3

    iget-object v1, v0, Lcom/waiqin365/lightapp/sales/b/a/j;->b:Ljava/lang/String;

    if-eqz v1, :cond_2

    const-string/jumbo v1, "1"

    iget-object v2, v0, Lcom/waiqin365/lightapp/sales/b/a/j;->b:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_2

    iget-object v1, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/sales/SalesInfoActivity;->a(Lcom/waiqin365/lightapp/sales/SalesInfoActivity;)Lcom/waiqin365/lightapp/view/ImagePreview;

    move-result-object v1

    if-eqz v1, :cond_0

    iget-object v1, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/sales/SalesInfoActivity;->a(Lcom/waiqin365/lightapp/sales/SalesInfoActivity;)Lcom/waiqin365/lightapp/view/ImagePreview;

    move-result-object v1

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/view/ImagePreview;->t()I

    move-result v1

    if-lez v1, :cond_0

    new-instance v1, Lcom/waiqin365/lightapp/kehu/b/o;

    invoke-direct {v1}, Lcom/waiqin365/lightapp/kehu/b/o;-><init>()V

    iget-object v2, v0, Lcom/waiqin365/lightapp/sales/b/a/j;->f:Ljava/lang/String;

    iput-object v2, v1, Lcom/waiqin365/lightapp/kehu/b/o;->a:Ljava/lang/String;

    invoke-static {}, Lcom/waiqin365/base/login/mainview/a;->a()Lcom/waiqin365/base/login/mainview/a;

    move-result-object v2

    iget-object v3, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    invoke-virtual {v2, v3}, Lcom/waiqin365/base/login/mainview/a;->k(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v2

    iput-object v2, v1, Lcom/waiqin365/lightapp/kehu/b/o;->b:Ljava/lang/String;

    iget-object v2, v0, Lcom/waiqin365/lightapp/sales/b/a/j;->g:Ljava/lang/String;

    iput-object v2, v1, Lcom/waiqin365/lightapp/kehu/b/o;->d:Ljava/lang/String;

    iget-object v2, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    invoke-static {v2}, Lcom/waiqin365/lightapp/sales/SalesInfoActivity;->a(Lcom/waiqin365/lightapp/sales/SalesInfoActivity;)Lcom/waiqin365/lightapp/view/ImagePreview;

    move-result-object v2

    invoke-virtual {v2, v1}, Lcom/waiqin365/lightapp/view/ImagePreview;->a(Lcom/waiqin365/lightapp/kehu/b/o;)V

    new-instance v1, Landroid/content/Intent;

    const-string/jumbo v2, "android.intent.action.RUN"

    invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    iget-object v2, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    const-class v3, Lcom/fiberhome/upload/UpLoadService;

    invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;

    iget-object v2, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    invoke-virtual {v2, v1}, Lcom/waiqin365/lightapp/sales/SalesInfoActivity;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;

    :cond_0
    iget-object v1, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/sales/SalesInfoActivity;->dismissProgressDialog()V

    iget-object v1, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/sales/SalesInfoActivity;->c(Lcom/waiqin365/lightapp/sales/SalesInfoActivity;)Landroid/content/Context;

    move-result-object v1

    invoke-static {v1}, Lcom/waiqin365/base/db/jxccache/f;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/jxccache/f;

    move-result-object v1

    iget-object v2, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    invoke-static {v2}, Lcom/waiqin365/lightapp/sales/SalesInfoActivity;->b(Lcom/waiqin365/lightapp/sales/SalesInfoActivity;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/waiqin365/base/db/jxccache/f;->h(Ljava/lang/String;)Z

    iget-object v1, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/sales/SalesInfoActivity;->d(Lcom/waiqin365/lightapp/sales/SalesInfoActivity;)Landroid/content/Context;

    move-result-object v1

    invoke-static {v1}, Lcom/waiqin365/base/db/jxccache/f;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/jxccache/f;

    move-result-object v1

    iget-object v2, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    invoke-static {v2}, Lcom/waiqin365/lightapp/sales/SalesInfoActivity;->b(Lcom/waiqin365/lightapp/sales/SalesInfoActivity;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/waiqin365/base/db/jxccache/f;->f(Ljava/lang/String;)Z

    iget-object v1, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/sales/SalesInfoActivity;->e(Lcom/waiqin365/lightapp/sales/SalesInfoActivity;)Z

    move-result v1

    if-eqz v1, :cond_1

    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    const-string/jumbo v1, "type"

    sget-object v2, Lcom/fiberhome/gaea/client/a/e;->c:Lcom/fiberhome/gaea/client/a/e;

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    const-class v2, Lcom/waiqin365/lightapp/chexiao/ChexiaoSalesProcessSelectActivity;

    invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    const-class v2, Lcom/waiqin365/lightapp/visit/SeniorVisitProcessSelectActivity;

    invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    invoke-static {}, Lcom/fiberhome/gaea/client/a/b;->a()Lcom/fiberhome/gaea/client/a/b;

    move-result-object v2

    const-string/jumbo v3, "reinit_activity"

    invoke-virtual {v2, v3, v0, v1}, Lcom/fiberhome/gaea/client/a/b;->a(Ljava/lang/String;Ljava/lang/Object;Ljava/util/List;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    iget-object v1, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    const v2, 0x7f080718

    invoke-virtual {v1, v2}, Lcom/waiqin365/lightapp/sales/SalesInfoActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/sales/SalesInfoActivity;->showToast(Ljava/lang/String;)V

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    const-class v1, Lcom/waiqin365/lightapp/sales/SalesDetailActivity;

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    const-class v1, Lcom/waiqin365/lightapp/sales/SalesCartActivity;

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    invoke-static {}, Lcom/fiberhome/gaea/client/a/b;->a()Lcom/fiberhome/gaea/client/a/b;

    move-result-object v1

    const-string/jumbo v2, "close_activity"

    invoke-virtual {v1, v2, v10, v0}, Lcom/fiberhome/gaea/client/a/b;->a(Ljava/lang/String;Ljava/lang/Object;Ljava/util/List;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/sales/SalesInfoActivity;->finish()V

    iget-object v0, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    const v1, 0x7f040020

    const v2, 0x7f040023

    invoke-virtual {v0, v1, v2}, Lcom/waiqin365/lightapp/sales/SalesInfoActivity;->overridePendingTransition(II)V

    goto/16 :goto_0

    :cond_1
    new-instance v5, Landroid/app/Dialog;

    iget-object v1, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    const v2, 0x7f0d0005

    invoke-direct {v5, v1, v2}, Landroid/app/Dialog;-><init>(Landroid/content/Context;I)V

    const v1, 0x7f030210

    invoke-virtual {v5, v1}, Landroid/app/Dialog;->setContentView(I)V

    const v1, 0x7f0c0acc

    invoke-virtual {v5, v1}, Landroid/app/Dialog;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    const v2, 0x7f0c0acd

    invoke-virtual {v5, v2}, Landroid/app/Dialog;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    const v3, 0x7f0c0ace

    invoke-virtual {v5, v3}, Landroid/app/Dialog;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/Button;

    const v4, 0x7f0c0acf

    invoke-virtual {v5, v4}, Landroid/app/Dialog;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/Button;

    iget-object v6, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    const v7, 0x7f080710

    invoke-virtual {v6, v7}, Lcom/waiqin365/lightapp/sales/SalesInfoActivity;->getString(I)Ljava/lang/String;

    move-result-object v6

    new-array v7, v9, [Ljava/lang/Object;

    iget-object v0, v0, Lcom/waiqin365/lightapp/sales/b/a/j;->d:Ljava/lang/String;

    aput-object v0, v7, v8

    invoke-static {v6, v7}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    invoke-static {}, Ljava/text/NumberFormat;->getInstance()Ljava/text/NumberFormat;

    move-result-object v0

    check-cast v0, Ljava/text/DecimalFormat;

    const/4 v1, 0x2

    invoke-virtual {v0, v1}, Ljava/text/DecimalFormat;->setMaximumFractionDigits(I)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/sales/SalesInfoActivity;->f(Lcom/waiqin365/lightapp/sales/SalesInfoActivity;)Lcom/waiqin365/lightapp/sales/c/a;

    move-result-object v1

    iget-object v1, v1, Lcom/waiqin365/lightapp/sales/c/a;->j:Ljava/lang/Double;

    invoke-virtual {v0, v1}, Ljava/text/DecimalFormat;->format(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    const-string/jumbo v1, ","

    const-string/jumbo v6, ""

    invoke-virtual {v0, v1, v6}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    const v6, 0x7f080711

    invoke-virtual {v1, v6}, Lcom/waiqin365/lightapp/sales/SalesInfoActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    new-array v6, v9, [Ljava/lang/Object;

    aput-object v0, v6, v8

    invoke-static {v1, v6}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    invoke-virtual {v5, v8}, Landroid/app/Dialog;->setCancelable(Z)V

    invoke-static {}, Lcom/fiberhome/gaea/client/a/b;->a()Lcom/fiberhome/gaea/client/a/b;

    move-result-object v0

    const-string/jumbo v1, "reinit_activity"

    const-class v2, Lcom/waiqin365/lightapp/sales/SalesListActivity;

    invoke-virtual {v0, v1, v10, v2}, Lcom/fiberhome/gaea/client/a/b;->a(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Class;)V

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    const-class v1, Lcom/waiqin365/lightapp/sales/SalesDetailActivity;

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    const-class v1, Lcom/waiqin365/lightapp/sales/SalesCartActivity;

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    invoke-static {}, Lcom/fiberhome/gaea/client/a/b;->a()Lcom/fiberhome/gaea/client/a/b;

    move-result-object v1

    const-string/jumbo v2, "close_activity"

    invoke-virtual {v1, v2, v10, v0}, Lcom/fiberhome/gaea/client/a/b;->a(Ljava/lang/String;Ljava/lang/Object;Ljava/util/List;)V

    new-instance v0, Lcom/waiqin365/lightapp/sales/o;

    invoke-direct {v0, p0, v5}, Lcom/waiqin365/lightapp/sales/o;-><init>(Lcom/waiqin365/lightapp/sales/n;Landroid/app/Dialog;)V

    invoke-virtual {v3, v0}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    new-instance v0, Lcom/waiqin365/lightapp/sales/p;

    invoke-direct {v0, p0, v5}, Lcom/waiqin365/lightapp/sales/p;-><init>(Lcom/waiqin365/lightapp/sales/n;Landroid/app/Dialog;)V

    invoke-virtual {v4, v0}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    invoke-virtual {v5}, Landroid/app/Dialog;->show()V

    goto/16 :goto_0

    :cond_2
    iget-object v1, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/sales/SalesInfoActivity;->dismissProgressDialog()V

    iget-object v1, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/sales/SalesInfoActivity;->i(Lcom/waiqin365/lightapp/sales/SalesInfoActivity;)Landroid/widget/TextView;

    move-result-object v1

    invoke-virtual {v1, v9}, Landroid/widget/TextView;->setEnabled(Z)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    iget-object v0, v0, Lcom/waiqin365/lightapp/sales/b/a/j;->c:Ljava/lang/String;

    invoke-static {v1, v0, v8}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    goto/16 :goto_0

    :cond_3
    iget-object v1, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/sales/SalesInfoActivity;->dismissProgressDialog()V

    iget-object v1, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/sales/SalesInfoActivity;->i(Lcom/waiqin365/lightapp/sales/SalesInfoActivity;)Landroid/widget/TextView;

    move-result-object v1

    invoke-virtual {v1, v9}, Landroid/widget/TextView;->setEnabled(Z)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/sales/n;->a:Lcom/waiqin365/lightapp/sales/SalesInfoActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/sales/SalesInfoActivity;->j(Lcom/waiqin365/lightapp/sales/SalesInfoActivity;)Landroid/content/Context;

    move-result-object v1

    iget v0, v0, Lcom/waiqin365/lightapp/sales/b/a/j;->a:I

    invoke-static {v1, v0}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;I)V

    goto/16 :goto_0

    nop

    :pswitch_data_0
    .packed-switch 0x3f0
        :pswitch_0
    .end packed-switch
.end method
